home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Interfaces & Libraries / graphics libraries / graphics debug library.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-29  |  21.1 KB  |  711 lines  |  [TEXT/MPS ]

  1. /* graphics libraries:
  2.     debug library routines
  3.     by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
  4.     Copyright 1987 - 1991 Apple Computer, Inc.  All rights reserved.    */
  5.  
  6.  
  7. #include <Types.h>
  8. #include "graphics debugging.h"
  9. #include "graphics libraries.h"
  10.  
  11.  
  12. /*** The spaces below allow this file to be
  13. compared in its engineering version
  14. side by side with the file
  15. “graphics errors.h”, to ensure
  16. that the two files are kept in sync. 
  17. These extra spaces may be removed
  18. for the shipping version. */
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. static char *errorText[] =
  31. {
  32.     "out of memory",
  33.     "internal fatal error",
  34.     "no outline font found",
  35.     "not enough memory for graphics client heap",
  36.     "could not create backing store",
  37.     
  38.     nil,
  39.     "internal error",
  40.     "internal font error",
  41.     "internal layout error",
  42.     "functionality unimplemented",
  43.     "clip to frame shape unimplemented",
  44.     
  45.     
  46.  
  47.     "null font scaler context",
  48.     "null font scaler input",
  49.     "invalid font scaler context",
  50.     "invalid font scaler input",
  51.     "invalid font scaler font data",
  52.     "font scaler newblock failed",
  53.     "font scaler bitmap allocation failed",
  54.     "font scaler outline allocation failed",
  55.     "required font scaler table missing",
  56.     "unsupported font scaler outline format",
  57.     "unsupported font scaler stream format",
  58.     "unsupported font scaler font format",
  59.     "font scaler hinting error",
  60.     "font scaler rasterizer error",
  61.     "font scaler internal error",
  62.     "font scaler invalid matrix",
  63.     "font scaler fixed overflow",
  64.     "font scaler api version mismatch",
  65.     
  66.     "unknown font scaler error",
  67.     
  68.     
  69.     "illegal font storage type",
  70.     "illegal font storage reference",
  71.     "illegal font attributes",
  72.     "illegal font parameter",
  73.     "font cannot be changed",
  74.     
  75.     
  76.     "fragmented memory",
  77.     "could not dispose backing store",
  78.     "unflattening interrupted by client",
  79.     
  80.     nil,
  81.     "parameter is nil",
  82.     "shape is nil",
  83.     "style is nil",
  84.     "transform is nil",
  85.     "ink is nil",
  86.     "transfer mode is nil",
  87.     "color is nil",
  88.     "color profile is nil",
  89.     "color set is nil",
  90.     "'spool procedure' is nil",
  91.     "tag is nil",
  92.     "type is nil",
  93.     "mapping is nil",
  94.     
  95.     "parameter out of range",
  96.     "inconsistent parameters",
  97.     "index is less than zero",
  98.     "index is less than one",
  99.     "count is less than zero",
  100.     "count is less than one",
  101.     "contour is less than zero",
  102.     "length is less than zero",
  103.     
  104.     "invalid client reference",
  105.     "invalid graphics heap start pointer",
  106.     "invalid nongraphic globals pointer",
  107.     
  108.     "color space out of range",
  109.     
  110.     "pattern lattice out of range",
  111.     "frequency parameter out of range",
  112.     "tinting parameter out of range",
  113.     "method parameter out of range",
  114.     "space may not be indexed",
  115.     
  116.     "glyph index too small",
  117.     "no glyphs added to font",
  118.     "glyph not added to font",
  119.     "point does not intersect bitmap",
  120.     
  121.     "required font table not present",
  122.     "unknown font table format",
  123.     
  124.     "shape fill not allowed",
  125.     "inverse fill face must set 'clip layer' flag",
  126.     "invalid transfer mode color space",
  127.     "color profile must be nil",
  128.     "bitmap pixel size must be 1",
  129.     "empty shape not allowed",
  130.     "'ignore platform shape' not allowed",
  131.     "nil style in glyph not allowed",
  132.     "complex glyph style not allowed",
  133.     
  134.     "cannot set item shapes to nil",
  135.     "cannot use original item shapes when growing picture",
  136.     "cannot add unspecified new glyphs",
  137.     "cannot dispose locked tag",
  138.     "cannot dispose locked shape",
  139.     
  140.     "graphic type does not have a structure",
  141.     "style run array does not match number of characters",
  142.     "rectangles cannot be inserted into",
  143.     
  144.     "unknown graphics heap",
  145.     "graphics routine selector is obsolete",
  146.     "cannot set graphics client memory without setting size",
  147.     "graphics client memory too small",
  148.     "graphics client memory is already allocated",
  149.     
  150.     "view port is a window",
  151.     
  152.     
  153.     "illegal type for shape",
  154.     "invalid view device reference",
  155.     "invalid view group reference",
  156.     "invalid view port reference",
  157.     
  158.     
  159.     "no owners",
  160.     "bad address",
  161.     "object wrong type",
  162.     "shape wrong type",
  163.     "style wrong type",
  164.     "ink wrong type",
  165.     "transform wrong type",
  166.     "device wrong type",
  167.     "port wrong type",
  168.     
  169.     
  170.     "shape cache wrong type",
  171.     "style cache wrong type",
  172.     "ink cache wrong type",
  173.     "transform cache wrong type",
  174.     "port cache wrong type",
  175.     "shape cache parent mismatch",
  176.     "style cache parent mismatch",
  177.     "ink cache parent mismatch",
  178.     "transform cache parent mismatch",
  179.     "port cache parent mismatch",
  180.     "invalid shape cache port",
  181.     "invalid shape cache device",
  182.     "invalid ink cache port",
  183.     "invalid ink cache device",
  184.     "invalid style cache port",
  185.     "invalid style cache device",
  186.     "invalid transform cache port",
  187.     "invalid transform cache device",
  188.     
  189.     "indirect memory block too small",
  190.     "indirect memory block too large",
  191.     "unexpected nil pointer",
  192.     "invalid pointer",
  193.     "invalid seed",
  194.     "invalid frame seed",
  195.     "invalid text seed",
  196.     "invalid draw seed",
  197.     "bad private flags",
  198.     "text bounds cache wrong size",
  199.     "text metrics cache wrong size",
  200.     "text index cache wrong size",
  201.     "bitmap ptr too small",
  202.     "bitmap ptr not aligned",
  203.     "bitmap row bytes negative",
  204.     "bitmap width negative",
  205.     "bitmap height negative",
  206.     "invalid pixel size",
  207.     "bitmap row bytes too small",
  208.     "bitmap row bytes not aligned",
  209.     "bitmap row bytes must be specified for user image buffer",
  210.     "invalid matrix flag",
  211.     "invalid vector count",
  212.     "invalid contour count",
  213.     "recursive caches",
  214.     "glyph run count negative",
  215.     "glyph run count zero",
  216.     "glyph run counts do not sum to character count",
  217.     "glyph first advance bit set not allowed",
  218.     "glyph tangent vectors both zero",
  219.     "layout run length negative",
  220.     "layout run length zero",
  221.     "layout run level negative",
  222.     "layout run lengths do not sum to text length",
  223.     "invalid 'fill shape' owner count",
  224.     "recursive 'fill shapes'",
  225.     "bad shape in picture",
  226.     "bad style in picture",
  227.     "bad ink in picture",
  228.     "bad transform in picture",
  229.     "bad shape cache in picture",
  230.     "bad seed in picture",
  231.     "invalid picture count",
  232.     "bad 'text layer' count",
  233.     "bad shape fill in text face",
  234.     "bad style in text face",
  235.     "bad transform in text face",
  236.     "transform clip missing",
  237.     "metrics wrong type",
  238.     "metrics point size probably bad",
  239.     "scalar block wrong type",
  240.     "scalar block parent mismatch",
  241.     "scalar block too small",
  242.     "scalar block too large",
  243.     "invalid metrics range",
  244.     "invalid metrics flags",
  245.     "metrics 'max width' probably bad",
  246.     "font wrong type",
  247.     "font wrong size",
  248.     "invalid font platform",
  249.     "invalid lookup range",
  250.     "invalid lookup platform",
  251.     "font not in font list",
  252.     "metrics not in metrics list",
  253.     "bad device private flags",
  254.     "bad device attributes",
  255.     "invalid device number",
  256.     "invalid device view group",
  257.     "invalid device bounds",
  258.     "invalid bitmap in device",
  259.     "color set wrong type",
  260.     "invalid color set view device owners",
  261.     "invalid color set color space",
  262.     "invalid color set count",
  263.     "color profile wrong type",
  264.     "invalid color profile flags",
  265.     "invalid color profile response count",
  266.     "backing free parent mismatch",
  267.     "backing store parent mismatch",
  268.     
  269.     nil,
  270.     "number of contours exceeds implementation limit",
  271.     "number of points exceeds implementation limit",
  272.     "size of polygon exceeds implementation limit",
  273.     "size of path exceeds implementation limit",
  274.     "size of text exceeds implementation limit",
  275.     "size of bitmap exceeds implementation limit",
  276.     "number of colors exceeds implementation limit",
  277.     
  278.     
  279.     
  280.     
  281.     nil,
  282.     "common colors not initialized",
  283.     "no open picture",
  284.     "picture already open",
  285.     "no open poly",
  286.     "poly already open",
  287.     "no open region",
  288.     "region already open",
  289.     "no active picture"
  290. };
  291.     
  292.     
  293.     
  294. static char *warningText[] =
  295. {
  296.     "warning stack underflow",
  297.     "warning stack overflow",
  298.     "notice stack underflow",
  299.     "notice stack overflow",
  300.     
  301.     nil,
  302.     "shape does not contain text",
  303.     "shape does not contain a bitmap",
  304.     "picture expected",
  305.     "bitmap is not resizable",
  306.     "shape operator may not be a bitmap",
  307.     "shape operator may not be a picture",
  308.     "graphic type does not contain points",
  309.     "graphic type does not have multiple contours",
  310.     "graphic type cannot be mapped",
  311.     "graphic type cannot be moved",
  312.     "graphic type cannot be scaled",
  313.     "graphic type cannot be rotated",
  314.     "graphic type cannot be skewed",
  315.     "graphic type cannot be reset",
  316.     "graphic type cannot be dashed",
  317.     "graphic type cannot be reduced",
  318.     "graphic type cannot be inset",
  319.     "shape cannot be inverted",
  320.     
  321.     nil,
  322.     "map shape out of range",
  323.     "move shape out of range",
  324.     "scale shape out of range",
  325.     "rotate shape out of range",
  326.     "skew shape out of range",
  327.     "map transform out of range",
  328.     "move transform out of range",
  329.     "scale transform out of range",
  330.     "rotate transform out of range",
  331.     "skew transform out of range",
  332.     
  333.     nil,
  334.     "contour out of range",
  335.     "index out of range in contour",
  336.     "picture index out of range",
  337.     "color index requested not found",
  338.     "color set index out of range",
  339.     "index out of range",
  340.     "count out of range",
  341.     "length out of range",
  342.     "font table index out of range",
  343.     "font glyph index out of range",
  344.     "font table not found",
  345.     "font name not found",
  346.     
  347.     
  348.     
  349.     "shape access not allowed",
  350.     "color set access restricted",
  351.     "color profile access restricted",
  352.     "tag access restricted",
  353.     "view device access restricted",
  354.     
  355.     
  356.     "new shape contains invalid data",
  357.     "new tag contains invalid data",
  358.     "extra data passed was ignored",
  359.     
  360.     
  361.     "unable to traverse open contour that starts or ends off th",
  362.     "unable to draw open contour that starts or ends off the cu",
  363.     "picture cannot contain itself",
  364.     "view port cannot contain itself",
  365.     "cannot dispose default shape",
  366.     "cannot dispose default style",
  367.     "cannot dispose default ink",
  368.     "cannot dispose default transform",
  369.     "cannot dispose default color profile",
  370.     "cannot dispose default color set",
  371.     "cannot set unique items attribute for a picture that alrea",
  372.     "shape not locked",
  373.     "tag not locked",
  374.     "shape direct attribute not set",
  375.     "first glyph advance must be absolute",
  376.     
  377.     
  378.     "shape does not have area",
  379.     "shape does not have length",
  380.     "point does not intersect port",
  381.     "cannot dispose non font",
  382.     
  383.     
  384.     "character substitution took place",
  385.     "font substitution took place",
  386.     "union of area and length returns area only",
  387.     "insufficient coordinate space for new device",
  388.     
  389.     
  390.     "unrecognized stream version",
  391.     "bad data in stream",
  392.     
  393.     
  394.     
  395.     "font scaler no output",
  396.     "font scaler fake metrics",
  397.     "font scaler fake linespacing",
  398.     "font scaler glyph substitution",
  399.     
  400.     
  401.     
  402.     "shape passed has no bounds",
  403.     "layer style cannot contain a face",
  404.     "layer glyph shape cannot contain nil styles",
  405.     "face override style font must match style",
  406.     "tags of type flst removed",
  407.     "translator already installed on this grafport",
  408.     "translator not installed on this grafport",
  409.  
  410.  
  411.  
  412.     nil,
  413.     "no picture drawn",
  414.     "polygons have different size contours",
  415.     "graphic type cannot be specifed by four values",
  416.     "graphic type cannot be specifed by six values",
  417.     "point expected",
  418.     "line or rectangle expected",
  419.     "curve expected",
  420.     "graphic type does not contain control bits",
  421.     "request exceeds available data",
  422.     "extra data unread",
  423.     "no variable length user data saved"
  424. };
  425.  
  426.  
  427.  
  428. static char *noticeText[] =
  429. {
  430.     "parameters have no effect",
  431.     "attributes already set",
  432.     "caps already set",
  433.     "clip already set",
  434.     "color already set",
  435.     "curve error already set",
  436.     "dash already set",
  437.     "default color profile already set",
  438.     "default ink already set",
  439.     "default transform already set",
  440.     "default shape already set",
  441.     "default style already set",
  442.     "dither already set",
  443.     "encoding already set",
  444.     "face already set",
  445.     "fill already set",
  446.     "font already set",
  447.     "font variations already set",
  448.     "glyph positions are already set",
  449.     "glyph tangents are already set",
  450.     "halftone already set",
  451.     "hit test already set",
  452.     "ink already set",
  453.     "join already set",
  454.     "justification already set",
  455.     "mapping already set",
  456.     "pattern already set",
  457.     "pen already set",
  458.     "style already set",
  459.     "tag already set",
  460.     "text attributes already set",
  461.     "text size already set",
  462.     "transfer already set",
  463.     "transform already set",
  464.     "type already set",
  465.     "view ports already set",
  466.     "view port already in view group",
  467.     "view device already in view group",
  468.     
  469.     "geometry unaffected",
  470.     "mapping unaffected",
  471.     "tags in shape ignored",
  472.  
  473.     "shape already in primitive form",
  474.     "shape already in simple form",
  475.     "shape already broken",
  476.     "shape already joined",
  477.     "cache already cleared",
  478.     
  479.     "shape not disposed",
  480.     "style not disposed",
  481.     "ink not disposed",
  482.     "transform not disposed",
  483.     "color set not disposed",
  484.     "color profile not disposed",
  485.     "font not disposed",
  486.     
  487.     "glyph tangents have no effect",
  488.     "glyph positions determined by advance",
  489.     "transform view ports already set",
  490.     
  491.     "'direct shape' attribute set as side effect",
  492.     "'lock shape' called as side effect",
  493.     
  494.     "disposed dead caches",
  495.     "disposed live caches",
  496.     "low on memory",
  497.     "very low on memory",
  498.     
  499.     "transform references disposed view port",
  500.     
  501.     
  502.     
  503.     
  504.     "zero length string passed"
  505. };
  506.  
  507.     #define errorTextSize   (sizeof(errorText)/sizeof(*errorText))
  508.     #define warningTextSize (sizeof(warningText)/sizeof(*warningText))
  509.     #define noticeTextSize  (sizeof(noticeText)/sizeof(*noticeText))
  510.  
  511. typedef struct {
  512.     char        (*errorMessages)[];
  513.     char        (*warningMessages)[];
  514.     char        (*noticeMessages)[];
  515.     char        *fatalErrorMessage;
  516.     char        *errorMessage;
  517.     char        *validationMessage;
  518.     char        *warningMessage;
  519.     char        *noticeMessage;
  520.     char        *undefinedMessage;
  521. } debugLibraryGlobals;
  522.  
  523. static debugLibraryGlobals messages = { errorText,
  524.                                 warningText, 
  525.                                 noticeText,
  526.                                 "FATAL GRAPHICS ERROR: ",
  527.                                 "GRAPHICS ERROR: ",
  528.                                 "VALIDATION ERROR: ",
  529.                                 "GRAPHICS WARNING: ",
  530.                                 "GRAPHICS NOTICE: ",
  531.                                 "ID = $xxxx (undefined)" };
  532. #define undefinedHexOffset 6    /* offset to "xxxx" above */
  533.  
  534. void SetGraphicsLibraryErrors(void)
  535. {
  536.     GXSetUserGraphicsWarning(DisplayGraphicsWarningMessage, (long)&messages);
  537.     GXSetUserGraphicsError(DisplayGraphicsErrorMessage, (long)&messages);
  538. }
  539.  
  540. void SetGraphicsLibraryNotices(void)
  541. {
  542.     GXSetUserGraphicsNotice(DisplayGraphicsNoticeMessage, (long)&messages);
  543. }
  544.  
  545. static char *LookupMessage(char (*table)[], short size, short range, short IDwithinRange)
  546. {
  547.     register char **message = table;
  548.  
  549.     while (range--) {
  550.         while (*message++)
  551.             if (message-(char **) table > size)
  552.                 return nil;
  553.     }
  554.     while (IDwithinRange--)
  555.         if (!*++message)
  556.             return nil;
  557.     return *message;
  558. }
  559.  
  560. static char *InnerGraphicsErrorMessage(gxGraphicsError errorID, debugLibraryGlobals *messageTables)
  561. {
  562.     if (errorID >= gxFirstAppWarning)
  563.         return nil;
  564.     else if (errorID >= gxFirstLibraryError)
  565.         return LookupMessage(messageTables->errorMessages, errorTextSize, 4, errorID - gxFirstLibraryError);
  566.     else if (errorID >= gxFirstImplementationLimitError)
  567.         return LookupMessage(messageTables->errorMessages, errorTextSize, 3, errorID - gxFirstImplementationLimitError);
  568.     else if (errorID >= gxFirstParameterError)
  569.         return LookupMessage(messageTables->errorMessages, errorTextSize, 2, errorID - gxFirstParameterError);
  570.     else if (errorID >= gxFirstNonfatalError)
  571.         return LookupMessage(messageTables->errorMessages, errorTextSize, 1, errorID - gxFirstNonfatalError);
  572.     else if (errorID >= gxFirstErrorNumber)
  573.         return LookupMessage(messageTables->errorMessages, errorTextSize, 0, errorID - gxFirstErrorNumber);
  574.     else
  575.         return nil;
  576. }
  577.  
  578. char *GraphicsErrorMessage(gxGraphicsError errorID)
  579. {
  580.     return InnerGraphicsErrorMessage(errorID, &messages);
  581. }
  582.  
  583. static char *InnerGraphicsWarningMessage(gxGraphicsWarning warningID, debugLibraryGlobals *messageTables)
  584. {
  585.     if (warningID >= gxFirstAppWarning)
  586.         return nil;
  587.     else if (warningID >= gxFirstLibraryWarning)
  588.         return LookupMessage(messageTables->warningMessages, warningTextSize, 4, warningID - gxFirstLibraryWarning);
  589.     else if (warningID >= gxFirstParameterOutOfRangeWarning)
  590.         return LookupMessage(messageTables->warningMessages, warningTextSize, 3, warningID - gxFirstParameterOutOfRangeWarning);
  591.     else if (warningID >= gxFirstResultOutOfRangeWarning)
  592.         return LookupMessage(messageTables->warningMessages, warningTextSize, 2, warningID - gxFirstResultOutOfRangeWarning);
  593.     else if (warningID >= gxFirstWrongTypeWarning)
  594.         return LookupMessage(messageTables->warningMessages, warningTextSize, 1, warningID - gxFirstWrongTypeWarning);
  595.     else if (warningID >= gxFirstWarningNumber)
  596.         return LookupMessage(messageTables->warningMessages, warningTextSize, 0, warningID - gxFirstWarningNumber);
  597.     else
  598.         return nil;
  599. }
  600.  
  601. char *GraphicsWarningMessage(gxGraphicsWarning warningID)
  602. {
  603.     return InnerGraphicsWarningMessage(warningID, &messages);
  604. }
  605.  
  606. static char *InnerGraphicsNoticeMessage(gxGraphicsNotice noticeID, debugLibraryGlobals *messageTables)
  607. {
  608.     if (noticeID >= gxFirstAppNotice)
  609.         return nil;
  610.     else if (noticeID >= gxFirstLibraryNotice)
  611.         return LookupMessage(messageTables->noticeMessages, noticeTextSize, 1, noticeID - gxFirstLibraryNotice);
  612.     else if (noticeID >= gxFirstNoticeNumber)
  613.         return LookupMessage(messageTables->noticeMessages, noticeTextSize, 0, noticeID - gxFirstNoticeNumber);
  614.     else
  615.         return nil;
  616. }
  617.  
  618. char *GraphicsNoticeMessage(gxGraphicsNotice noticeID)
  619. {
  620.     return InnerGraphicsNoticeMessage(noticeID, &messages);
  621. }
  622.  
  623. static char *HexToAscii(register long value, char *str, register short digits)
  624. {
  625.     register char *end = str + digits;
  626.     register char *p = end;
  627.  
  628.     while (--digits >= 0) {
  629.         register char nibble = '0' + (value & 0x0F);
  630.         if (nibble > '9') nibble += 'A' - '9' - 1;
  631.         *--p = nibble;
  632.         value >>= 4;
  633.     }
  634.     return end;
  635. }
  636.  
  637. static void DisplayMessage(char *signalClass, long id, char *signalText, debugLibraryGlobals *messageTables)
  638. {
  639.     char debugString[255];
  640.     register char *dst = debugString + 1;
  641.     register char *src;
  642.     char *hexPosition;
  643.  
  644.     src = signalClass;
  645.     while (*dst++ = *src++) ;
  646.     --dst;
  647.  
  648.     src = signalText;
  649.     if (src == nil) {
  650.         src = messageTables->undefinedMessage;
  651.         hexPosition = dst + undefinedHexOffset;
  652.     }
  653.     while (*dst++ = *src++) ;
  654.     *--dst = '.';
  655.     if (signalText == nil)
  656.         HexToAscii((unsigned long) id, hexPosition, 4);
  657.  
  658.     debugString[0] = dst - debugString;
  659.     DebugStr((void *) debugString);
  660. }
  661.  
  662. void DisplayGraphicsErrorMessage(gxGraphicsError errorID, long context)
  663. {
  664.     char buffer[255];
  665.     long thing;
  666.     long argNum;
  667.     debugLibraryGlobals *messageTables = (debugLibraryGlobals *)context;
  668.     
  669.     if (errorID == fragmented_memory)
  670.         return;
  671.     if (GXGetValidationError(nil, (void **)&thing, &argNum)) {
  672.         char *walker = buffer;
  673.         char *copy = messageTables->validationMessage;
  674.         
  675.         while (*walker = *copy++)
  676.             ++walker;
  677.         GXGetValidationError(walker, nil, nil);
  678.         while (*walker)
  679.             ++walker;
  680.         *walker++ = '(';
  681.         *walker++ = '0';
  682.         *walker++ = 'x';
  683.         HexToAscii(thing, walker, 8);
  684.         walker += 8;
  685.         *walker++ = ')';
  686.         *walker++ = ' ';
  687.         *walker = 0;
  688.         DisplayMessage(buffer, errorID, InnerGraphicsErrorMessage(errorID, messageTables),
  689.                     messageTables);
  690.     } else
  691.         DisplayMessage((errorID >= gxFirstFatalError && errorID <= gxLastFatalError) ? 
  692.             messageTables->fatalErrorMessage : messageTables->errorMessage,
  693.             errorID, InnerGraphicsErrorMessage(errorID, messageTables), messageTables);
  694. }
  695.  
  696. void DisplayGraphicsWarningMessage(gxGraphicsWarning warningID, long context)
  697. {
  698.     debugLibraryGlobals *messageTables = (debugLibraryGlobals *)context;
  699.  
  700.     DisplayMessage(messageTables->warningMessage, warningID,
  701.                 InnerGraphicsWarningMessage(warningID, messageTables), messageTables);
  702. }
  703.  
  704. void DisplayGraphicsNoticeMessage(gxGraphicsNotice noticeID, long context)
  705. {
  706.     debugLibraryGlobals *messageTables = (debugLibraryGlobals *)context;
  707.  
  708.     DisplayMessage(messageTables->noticeMessage, noticeID,
  709.         InnerGraphicsNoticeMessage(noticeID, messageTables), messageTables);
  710. }
  711.